# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=tlsfuzzer
pkgver=1942.59dff3d
pkgrel=1
pkgdesc='SSL and TLS protocol test suite and fuzzer.'
groups=('blackarch' 'blackarch-crypto' 'blackarch-fuzzer')
arch=('any')
url='https://github.com/tomato42/tlsfuzzer'
license=('GPL2')
depends=('python' 'python-tlslite-ng' 'python-ecdsa' 'python-six')
makedepends=('git' 'python-setuptools' 'python-pyaml' 'python-requests'
             'python-coverage' 'python-coveralls' 'python-pylint')
source=("git+https://github.com/tomato42/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  ( set -o pipefail
    git describe --long --tags --abbrev=7 2>/dev/null |
      sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "%s.%s" "$(git rev-list --count HEAD)" \
      "$(git rev-parse --short=7 HEAD)"
  )
}

build() {
  cd $pkgname

  python setup.py build
}

package() {
  cd $pkgname

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

